Skip to content

Add support for HA Proxy Protocol TLV's#5972

Open
damianorenfer wants to merge 1 commit intoeclipse-vertx:masterfrom
damianorenfer:master
Open

Add support for HA Proxy Protocol TLV's#5972
damianorenfer wants to merge 1 commit intoeclipse-vertx:masterfrom
damianorenfer:master

Conversation

@damianorenfer
Copy link

Motivation:

TLV's are supported in netty, but currently not accessible to vert.x users.
Here the TLV's are exposed in NetSocket#tlvs

This also answers to #5452

Conformance:
ECA signed

@vietj
Copy link
Member

vietj commented Feb 15, 2026

I'd rather expose that has a Map<Buffer, Buffer> instead (that map can be ordered if needed)

TLV's are supported in netty, but currently not accessible to vert.x
users.
Here the TLV's are exposed in `NetSocket#tlvs`
@damianorenfer
Copy link
Author

Sure, I just updated the code accordingly

* the value contains the TLV value, mainly used for HA Proxy Protocol v2
*/
@GenIgnore()
Map<Buffer, Buffer> tlvs();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need that ? Quic does not yet support proxying at the moment and we are not sure it makes sense

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that seems at the moment to be a TCP concern only

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you see a better place to put this one ? The goal is to access TLV's in NetServer#connectHandler

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, it is fine here, I meant actually on QuicConnection it should apply to.

* the value contains the TLV value, mainly used for HA Proxy Protocol v2
*/
@GenIgnore()
Map<Buffer, Buffer> tlvs();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should return null when it does not apply, e.g. HTTP/3

@tmonney
Copy link

tmonney commented Feb 16, 2026

The protocol technically allows for multiple occurrences of TLVs with the same type. It's probably not that common, but I am wondering if it makes sense to add unnecessary constraints. The underlying Netty decoder also uses a List, presumably for that reason.

@damianorenfer
Copy link
Author

The protocol technically allows for multiple occurrences of TLVs with the same type. It's probably not that common, but I am wondering if it makes sense to add unnecessary constraints. The underlying Netty decoder also uses a List, presumably for that reason.

@vietj I was also not able to find anything about TLV uniqueness based on type here.
What do you think ?

* the value contains the TLV value, mainly used for HA Proxy Protocol v2
*/
@GenIgnore()
Map<Buffer, Buffer> tlvs();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Map<Buffer, Buffer> tlvs();
default Map<Buffer, Buffer> tlvs() {
return Map.of();
}

Comment on lines +180 to +181
/**
* @return the type-length-values present in the TCP header as map where the key contains the TLV type and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* @return the type-length-values present in the TCP header as map where the key contains the TLV type and

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants